Home } Messages } Split String



The substring() function allows you to pull out any combination of characters from a string. In this example, an unformated date string such as 19990422 (which represents April 22, 1999) can be split up into 1999, 04, and 22. Each of these are separate variables that you can deal with independently in your scripts! Neat!

JavaScript Source Code 2002: Messages: Split String

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!